<?php
	echo $this->Html->css(array('jquery.ad-gallery'));
	echo $this->Html->script(array('jquery.ad-gallery'));
?>
<script type="text/javascript">

$(function() {
	var galleries = $('.ad-gallery').adGallery();
    $('#switch-effect').change(
      function() {
        galleries[0].settings.effect = $(this).val();
        return false;
      }
    );
    $('#toggle-slideshow').click(
      function() {
        galleries[0].slideshow.toggle();
        return false;
      }
    );
    $('#toggle-description').click(
      function() {
        if(!galleries[0].settings.description_wrapper) {
          galleries[0].settings.description_wrapper = $('#descriptions');
        } else {
          galleries[0].settings.description_wrapper = false;
        }
        return false;
      }
    );
  });
</script>
<style>
	#gallery {
    background: #e1eef5;
    padding: 0 30px;
    margin-bottom: 10px;
  }
  #descriptions {
    position: relative;
    height: 50px;
    background: #EEE;
    margin-top: 10px;
    width: 640px;
    padding: 10px;
    overflow: hidden;
}
#descriptions .ad-image-description {
  position: absolute;
}
  #descriptions .ad-image-description .ad-description-title {
    display: block;
  }
</style>
<div id="zt-colright" class="span9">
	<div id="zt-modwrap">
		<div class="zt-modwrap-pad">
			<div id="zt-colleft" class="span12">
				<div class="module-color zt-mod-br">
					<div class="zt-mod-bl">
						<div class="zt-mod-tr">
							<div class="zt-mod-tl clearfix">
								<h3><span><?php echo __('cttieubieu',true);?></span></h3>
								<div class="mod-content">
									<div class="custom-color">

										<?php if(count($galleries)!=0){?>
										<!--ảnh cho sản phẩm-->
										<br>
										<div id="gallery" class="ad-gallery span8 offset1">
											<div class="ad-image-wrapper"></div>
											<div class="ad-controls"></div>
											<div class="ad-nav">
												<div class="ad-thumbs">
													<ul class="ad-thumb-list">
														<?php foreach($galleries as $item){?>
														<li>
															<a href="<?php echo $this->webroot;?>files/uploads/gallery/<?php echo $item['Gallery']['url'];?>">
															<img width='45' src="<?php echo $this->webroot;?>files/uploads/gallery/<?php echo $item['Gallery']['url'];?>" alt="<?php echo $item["Gallery"]["note"];?>" title='<?php echo $this->Html->link($item["Gallery"]["name"],array("plugin"=>false,"language"=>$lang,"controller"=>"galleries","action"=>"chitiet",$this->Link->seo($item["Gallery"]["id"],$item["Gallery"]["name"])));?>'>
															</a>
														</li>
														<?php }?>
													</ul>
												</div>
											</div>
										</div>
										<div class="clearfix"></div>
										<?php }?>

									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>